﻿<div class="cart-item">
	<a @onclick="OnRemoved" class="delete-item">x</a>
	<div class="title">@(Pizza.Size)" @Pizza.Special?.Name</div>
	<ul>
		@foreach (var topping in Pizza.Toppings)
		{
			<li>+ @topping.Topping?.Name</li>
		}
	</ul>
	<div class="item-price">
		@Pizza.GetFormattedTotalPrice()
	</div>
</div>

@code {
	[Parameter, EditorRequired] public Pizza Pizza { get; set; } = new();
	[Parameter, EditorRequired] public EventCallback OnRemoved { get; set; }
}